package cn.mason.devopstest;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.io.BufferedReader;
import java.io.InputStreamReader;

@SpringBootApplication
@RestController
public class DevopstestApplication {

	public static void main(String[] args) {
		SpringApplication.run(DevopstestApplication.class, args);
	}
	@RequestMapping(value = "/devops",method = RequestMethod.GET)
	public String devops() throws Exception{
		String shpath="~/test.sh";
		Process ps = Runtime.getRuntime().exec("mkdir tt1");
		ps.waitFor();

		return "hello";
	}
}
